Towards Scalable Partial Evaluation of Declarative Programs
نویسنده
چکیده
Partial evaluation is a well-known technique for program specialization [4]. Essentially, given a program and part of its input data—the so-called static data—a partial evaluator returns a new, residual program which is specialized for the given data. The residual program is then used for performing the remaining computations—those that depend on the so-called dynamic data. There are two main approaches to partial evaluation, depending on the way termination issues are addressed. On the one hand, online partial evaluators take decisions on the fly while the constructs of the source code are partially evaluated and the corresponding residual program is built. Offline partial evaluators, on the other hand, require a binding-time analysis (BTA) to be run before specialization, which annotates the source code to be specialized. Basically, every call of the source program is annotated as either unfold (to be executed by the partial evaluator) or memo (to be executed at run time, i.e., memoized), and every argument is annotated as static (known at specialization time) or dynamic (only definitely known at run time). Offline partial evaluators are usually faster but less accurate than online ones since the BTA phase is performed—and also termination issues are addressed—using an approximation of the static data. There are several basic properties of a partial evaluator that can be addressed:
منابع مشابه
A Practical Partial Evaluation Scheme for Multi-Paradigm Declarative Languages
We present a practical partial evaluation scheme for multi-paradigm declarative languages combining features from functional, logic, and concurrent programming. In contrast to previous approaches, we consider an intermediate representation for programs into which source programs can be automatically translated. The use of this simplified representation, together with the appropriate control iss...
متن کاملAn extensible declarative classification framework and its efficient implementation (Draft)
We design a generic declarative framework for classification of objects in imperative languages, which allows for arbitrary extensions through callbacks to procedural code. Our work is inspired by some more general tools for knowledge representation, such as prioritized extended datalog programs ([9], [6]). We also outline an efficient and scalable algorithm for evaluating our programs, which i...
متن کاملA residualizing semantics for the partial evaluation of functional logic programs
Recent proposals for multi-paradigm declarative programming combine the most important features of functional, logic and concurrent programming into a single framework. The operational semantics of these languages is usually based on a combination of narrowing and residuation. In this note, we introduce a non-standard, residualizing semantics for multi-paradigm declarative programs and prove it...
متن کاملForward Slicing of Multi-paradigm Declarative Programs Based on Partial Evaluation
Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm declarative programs. In particular, we show how program slicing can be defined in terms of online p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009